<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        function randomColor(){
            // toString(16) 转换为16进制
            return '#'+Math.random().toString(16).slice(2,8).padEnd(6,'0');
        }
        function randomString(len=6){
            if(len<11){
                return Math.random().toString(36)
                .slice(2,len).padEnd(len,'0');
            }else{
                return randomString(11)+randomString(len-11);
            }
        }
    </script>
</body>
</html>